<!-- 提示信息 -->
<app-tip [type]="tipType"></app-tip>
<app-load *ngIf="isLoading"></app-load>
<div class="header">
  <div class="left flex" [routerLink]="['/main/statistics']" id="btn-back">
    <div class="left-icon">
      <i class="fa fa-angle-left back-icon" aria-hidden="true"></i>
    </div>
    <div class="left-name">
      <span class="back-name">返回</span>
    </div>
  </div>
  <div class="center">服务生点单统计</div>
</div>

<div class="main">
  <div class="search-box">
    <div class="search flex">
      <div class="start">开始时间：</div>
      <div class="input">
        <input type="date" class="search-input" [(ngModel)]="params.startTime" id="start-time" value="">
      </div>
      <div class="text">
        <span class="clear-data" (click)="clearData()">清除</span>
      </div>
    </div>
    <div style="height: 10px">&nbsp;</div>
    <div class="search flex" style="padding-bottom: .7em">
      <div class="start"> 结束时间：</div>
      <div class="input">
        <input type="date" class="search-input" [(ngModel)]="params.endTime">
      </div>
      <div class="text">
        <span class="search-btn" (click)="getData(true)">搜索</span>
      </div>
    </div>
  </div>
  <div *ngIf="list.length"
       style="font-weight: 600;font-size: 1.2em;padding-left: 1em;background: #fff;border-top: 2px solid #3c8dbc;height:3em;line-height:3em;text-align: left;color: #666;">
    点击列表查看详情
  </div>
  <div class="record-box">
    <div class="record-list" *ngFor="let v of list" (click)="getDetails(v.create_user_id)">
      <div class="record-item flex">
        <div class="record-item-name">姓名</div>
        <div class="record-item-text">{{v.create_user_name}}</div>
      </div>
      <div class="record-item flex">
        <div class="record-item-name">下单数量</div>
        <div class="record-item-text">{{v.item}}</div>
      </div>
      <div class="record-item flex">
        <div class="record-item-name">总金额</div>
        <div class="record-item-text">￥{{v.amontMoney | price}}</div>
      </div>
    </div>
  </div>

  <div class="load-data" *ngIf="loading">
    <p class="load-data-icon">
      <i class="fa fa-spinner fa-spin fa-3x fa-fw"></i>
    </p>
    <p class="load-data-text">
      数据加载中
    </p>
  </div>

</div>
<div class="no-data" *ngIf="!list.length && isFlag">
  <p class="load-data-description">
    <i class="fa fa-info-circle"></i> <span>暂无统计数据</span>
  </p>
</div>

